#  encoding=utf-8
#! /usr/sbin
import xlrd
from xlutils.copy import copy
from excelword.util.matchkey import MatchKey
def writexls(filepath,row,key,value):
    #打开一份excel 文件，在副本集里面修改后保存
    read_data = xlrd.open_workbook(filepath)
    write_data = copy(read_data)
    sheet_data = write_data.get_sheet(0)
    col = int(MatchKey[key].value)
    sheet_data.write(row,col,value)
    write_data.save(filepath)